package com.fz.entity;

import com.fz.core.BaseEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 存储用户所有操作日志
 * </p>
 *
 * @author hyr
 * @since 2025-06-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Log extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 订单编号
     */
    private String orderNumber;

    /**
     * 日志内容
     */
    private String content;

    /**
     * 操作类型
     */
    private String operationType;

    /**
     * 操作金额
     */
    private BigDecimal amount;

    /**
     * 操作结果
     */
    private String result;

    /**
     * 用户ID（外键）
     */
    private Long userId;

    /**
     * 提交时间
     */
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;


    public Log(String  orderNumber, String content, String operationType, BigDecimal amount, String result, LocalDateTime now, Long id)
    {
        this.content=content;
        this.orderNumber=orderNumber;
        this.operationType=operationType;
        this.amount=amount;
        this.result=result;
        this.createTime=now;
        this.userId=id;
    }
}
